﻿<h2>My Job Vacancies</h2>
<div class="row">
    <p align="right">
        <input type="text" class="search-query" placeholder="Search" ng-model="searchText"></p>
    <table class="table table-condensed table-hover">
        <tr>
            <th>Vacancy ID</th>
            <th>Vacancy</th>
            <th>Valid From</th>
            <th>Valid To</th>
            <th>Application Quota</th>
            <th>Status</th>
            <th></th>
        </tr>
        <tr ng-repeat="vacancy in vacancys | filter:searchText">
            <td><a href="/detail/{{vacancy.vacancy_id}}">{{vacancy.vacancy_id}}</a></td>
            <td>{{vacancy.vacancy_for}}</td>
            <td>{{vacancy.valid_from | date:'medium'}}</td>
            <td>{{vacancy.valid_to | date:'medium'}}</td>
            <td>{{vacancy.max_applications}}</td>
            <td>{{vacancy.status | lowercase }}</td>
            <td>
                <a href="/skill/{{vacancy.vacancy_id}}">
                    <img src="../img/Add_16x16.png" alt="Add Skills" /></a>
                <a href="/detail/{{vacancy.vacancy_id}}">
                    <img src="../img/Edit_16x16.png" alt="Edit" /></a>
                <img src="../img/Copy_16x16.png" alt="Copy" ng-click="copyVacancy(vacancy)" />
                <img src="../img/Delete_16x16.png" alt="Delete" ng-click="deleteVacancy(vacancy)" />
            </td>
        </tr>
    </table>
</div>
